package com.znufe.exam.viewmodel.admin.course;

import com.znufe.exam.domain.course.CoursePageResponseObject;
import com.znufe.exam.utility.DateTimeUtil;
import com.znufe.exam.viewmodel.BaseVM;
import lombok.Data;

/**
 * @author gong
 */
@Data
public class CoursePageResponseVm extends BaseVM {
    private Integer id;

    private String courseProjectStr;

    private String courseName;

    private String courseTypeStr;

    private String gmtCreate;

    private Integer status;

    public static CoursePageResponseVm from(CoursePageResponseObject object){
        CoursePageResponseVm vm = modelMapper.map(object,CoursePageResponseVm.class);
        vm.setGmtCreate(DateTimeUtil.dateFormat(object.getGmtCreate()));
        return vm;
    }
}
